{include file="header.html"}

<div class="page-header">
	<h6>
		订单管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			订单结算
		</small>
	</h6>
</div><!-- /.page-header -->

<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=order&act=jiesuan" enctype="multipart/form-data">
	<input type="hidden" id="id" name="id" value="{$row->id}" />
	<div class="profile-user-info profile-user-info-striped">
		<div class="profile-info-row">
			<div class="profile-info-name"> ID </div>
			<div class="profile-info-value">
				<span>{$row->id}</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 订单号 </div>
			<div class="profile-info-value">
				<span>{$row->order_sn}</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 订单金额 </div>
			<div class="profile-info-value">
				<span>{$row->total_price}</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 下单时间 </div>
			<div class="profile-info-value">
				<span>{$row->add_time|date_format:"%Y-%m-%d %H:%I:%S"}</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 订单状态 </div>
			<div class="profile-info-value">
				<span>{$row->status_name}</span>
			</div>
		</div>

		<div class="profile-info-row">
			<div class="profile-info-name"> 结算状态 </div>
			<div class="profile-info-value">
				<div class="radio">
					<label>
						<input {if $row->is_jiesuan==1}checked{/if} value="1" name="status" type="radio" class="ace" />
						<span class="lbl"> 正常</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input {if $row->status==0}checked{/if} value="0" name="status" type="radio" class="ace" />
						<span class="lbl"> 隐藏 </span>
					</label>
				</div>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 开始服务时间和位置 </div>
			<div class="profile-info-value">
				<span>
					{if $row->begin_time} 
						开始服务时间：{$row->begin_time|date_format:"%Y-%m-%d %H:%I:%S"} 
						开始服务位置：{$row->begin_longitude} , {$row->begin_latitude}
						{if $row->begin_longitude>0 && $row->begin_latitude>0}
							<div id="allmap1" style="width:450px;height:250px"></div>
						{/if}
					{/if}
				</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 结束服务时间和位置 </div>
			<div class="profile-info-value">
				<span>
					{if $row->end_time} 
						结束服务时间：{$row->end_time|date_format:"%Y-%m-%d %H:%I:%S"} 
						结束服务位置：{$row->end_longitude} , {$row->end_latitude} 
						{if $row->end_longitude>0 && $row->end_latitude>0}
							<div id="allmap2" style="width:450px;height:250px"></div>
						{/if}
					{/if}
				</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 评价 </div>
			<div class="profile-info-value">
				<span>
					{if $row->comment} 
						星级：{$row->comment->stars}星 &nbsp;&nbsp;&nbsp;&nbsp; 评论时间：{$row->comment->add_time|date_format:"%Y-%m-%d %H:%I:%S"} 
					{/if}
				</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 备注 </div>
			<div class="profile-info-value">
			<textarea name="memo" id="memo" rows="3" style="width:80%">{$row->memo}</textarea>
			</div>
		</div>
	</div>

	<div class="clearfix form-actions">
		<div class="col-md-offset-3 col-md-9">
			<button class="btn btn-info" type="submit">
				<i class="ace-icon fa fa-check bigger-110"></i>
				提交
			</button>

			&nbsp; &nbsp; &nbsp;
			<button class="btn" type="reset">
				<i class="ace-icon fa fa-undo bigger-110"></i>
				重置
			</button>

			&nbsp; &nbsp; &nbsp;
			<button class="btn btn-info" type="button" onclick="javascript:history.go(-1)">
				<i class="ace-icon fa fa-check bigger-110"></i>
				返回
			</button>
		</div>
	</div>
	</form>
</div>
</div>

{include file="footer.html"}
<script>
$(function(){
	$('#service_time').datepicker({
		useStyle:'datepicker2',
		readonly:false,
		showTime:true,
		showSecond:false,
		format:'yyyy-mm-dd hh:nn'
	});
});
</script>


<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=8dCDnV31Xg1QBbrWyrHmquR3 "></script>
<script type="text/javascript">
var map1 = new BMap.Map("allmap1");
var map2 = new BMap.Map("allmap2");
// 用经纬度设置地图中心点
function theLocation(map, longitude, latitude){
		map.clearOverlays(); 
		var new_point = new BMap.Point(longitude, latitude);
		var marker = new BMap.Marker(new_point);  // 创建标注
		map.addOverlay(marker);              // 将标注添加到地图中
		map.panTo(new_point);      
}	

{if $row->begin_longitude>0 && $row->begin_latitude>0}
map1.centerAndZoom(new BMap.Point({$row->begin_longitude}, {$row->begin_latitude}),14);
theLocation(map1, {$row->begin_longitude}, {$row->begin_latitude});
{/if}

{if $row->end_longitude>0 && $row->end_latitude>0}
map2.centerAndZoom(new BMap.Point({$row->end_longitude}, {$row->end_latitude}),14);
theLocation(map2, {$row->end_longitude}, {$row->end_latitude});
{/if}
</script>